import {
	defineConfig
} from "vite";
import uni from "@dcloudio/vite-plugin-uni";
import {
	resolve
} from "path";

// https://vitejs.dev/config/
export default defineConfig({
	plugins: [uni()],
	resolve: {
		// 路径别名
		alias: {
			"@": resolve(__dirname, "./"),
		},
	},
	chainWebpack: (config) => {
		config.module
			.rule('images')
			.use('image-webpack-loader')
			.loader('image-webpack-loader')
			.options({
				bypassOnDebug: true
			}); // 开发环境跳过压缩
	}
});